<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GeneViewer Demo</title>

<script src="http://static.simile.mit.edu/timeline/api-2.2.0/timeline-api.js" type="text/javascript"></script>
<script src="geneviewer-api.js" type="text/javascript"></script>

<script type="text/javascript">
var viewer;
function onLoad() {
  var bandInfos = [
    Timeline.GeneViewer.createBandInfo({
        width:          "100%", 
        intervalUnit:   Timeline.GeneViewerUnit.BASES, 
        intervalPixels: 100,
        date: 1000
    })];
  viewer = Timeline.GeneViewer.create(document.getElementById("geneviewer"), bandInfos);
}

var resizeTimerID = null;
function onResize() {
    if (resizeTimerID == null) {
        resizeTimerID = window.setTimeout(function() {
            resizeTimerID = null;
            viewer.layout();
        }, 500);
    }
}
</script>

</head>
<body  onload="onLoad();" onresize="onResize();">
<div id="geneviewer" style="height: 150px; border: 1px solid #aaa"></div>
</body>
</html>